package cn.wang.common.enums.impl;

import cn.wang.common.enums.ExceptionBaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnum implements ExceptionBaseEnum {
    PRICE_CANNOT_BE_NULL(400, "价格不能为空"),
    CATEGORY_NOT_FOND(404, "没有找到商品分类"),
    BRAND_NOT_FOND(404, "没有找到品牌"),
    BRAND_IS_NULL(412, "请填写商品信息"),
    CIDS_IS_NULL(412, "请选择商品所属的分类"),
    BRAND_SAVE_ERROR(500, "保存商品失败"),
    UPLOAD_IMAGE_FAILED(500, "上传图片失败"),
    FILE_NOT_IS_IMAGE(400, "上传的文件不是图片"),
    IMAGE_NOT_ALLOW(400, "上传的图片不支持"),
    CATEGORY_ID_IS_NULL(400, "请传入商品分类id"),
    GROUP_NOT_FIND(400, "该商品分类下还没有商品规格分类, 快去添加把!!"),
    GOOD_NOT_FOND(500, "没有找到商品"),
    GOODS_SAVE_ERROR(500, "商品保存失败"),
    SUP_DETAIL_NOT_FIND(500, "spu不存在"),
    SKU_NOT_FIND(500, "sku不存在"),
    SUP_NOT_NULL(400, "spu的id不能为空"),
    GOODS_UPDATE_ERROR(500, "商品更新失败"),
    INVALID_USER_PARAM(400, "无效的用户参数"),
    USERNAME_OR_PASSWORD_IS_NULL(400, "请填写用户名和密码"),
    USERNAME_ERROR(400, "用户名错误"),
    PASSWORD_ERROR(400, "密码错误"),
    CREATE_TOKEN_ERROR(500, "生成token异常"),
    TOKEN_ERROR(400, "token错误");
    private Integer code;
    private String message;
}
